﻿#pragma once
#include <vector>
#include <memory>
#include "ITCatTableBase.h"
#include "ITCatTableCell.h"
class ITCatTableControl;
class ITCatTableRow : public ITCatTableBase
{
public:
	ITCatTableRow(ITCatTableControl* pTable);
	ITCatTableControl* m_pTable;
	std::vector<std::unique_ptr<ITCatTableCell>> cells;
	using ITCatTableBase::height;							//启用基类中的height,作为行高使用。
	using ITCatTableBase::index;							//启用基类中的index，作为行索引。
	using ITCatTableBase::isSelected;
	using ITCatTableBase::isSelectEnable;

	int iconIndex = -1;		//图标索引，为-1表示无图标，>-1对应imagelist中的索引。 
	
	// 分隔行相关方法
	bool IsSeparatorRow() const { return GetStyle(ROW_SEPARATOR); }
	void SetSeparatorRow(bool isSeparator) { 
		if (isSeparator) {
			AddStyle(ROW_SEPARATOR);
		} else {
			RemoveStyle(ROW_SEPARATOR);
		}
	}
};

